<!DOCTYPE html>
<html lang="zh" ng-app="myApp">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>主页</title>
    <link rel="stylesheet" href="${ctx}/css/style2L.css" />
    <link href="${ctx}/img/blue/doubleDate.css" rel="stylesheet"/>
    <script src="${ctx}/js/angular.min.js"></script>
    <script src="${ctx}/js/angular-route.min.js"></script>
    <script src="${ctx}/js/jquery-1.4.2.min.js"></script>
    <script src="${ctx}/js/doubleDate2.0.js"></script>
    <script src="${ctx}/js/style.js"></script>
    <script>
        var m = angular.module('myApp', []);

        m.controller('sub2', ['$scope', '$http', function($scope, $http){
        	var username = $("#username").val();
        	if(username == "null"){
        		$scope.keyword = "";
        	}else{
        		$scope.keyword = username;
        	}
        	
            document.getElementById("startDate").Value = "1970-01-01";
            var myDate = new Date();
            document.getElementById("endDate").Value = myDate.getFullYear()+"-"+(myDate.getMonth()+1)+"-"+(myDate.getDate()+1);
            
            $scope.getDate = function(){
        		var startDate = document.getElementById("startDate").Value;
        		$scope.startTime = startDate;
        		var endDate = document.getElementById("endDate").Value;
        		$scope.endTime = endDate;
        	};
        	
        	$scope.selectKArtListByDate = function (){
        		$scope.getDate();
        		
        		$http({
		          url:'KArtAction!selectKArtListByDate',
		          method:'get',
		          params:
		          {
		            'startTimeS' : $scope.startTime,
		            'endTimeS':  $scope.endTime,
		            'keyword' : $scope.keyword,
		            'pageNo' : $scope.page
		          }
		        }).success(function(data, status, headers, config){
		        	$scope.page = {
		        			'prePage' : data.kArtPagList.prePage,
		        			'nextPage' : data.kArtPagList.nextPage,
		        			'totalPage' : data.kArtPagList.totalPage,
		        	};
		        	$scope.kArtList = data.kArtPagList.list;
		        }).error(function(data, status, headers, config){
		          //处理响应失败
		          alert("请求失败！");
		    });
		    
        	};
        	
        	$scope.selectKArtListByDate();
        	
        	$scope.firstPage = function (){
        		$scope.page = 1;
        		$scope.selectKArtListByDate();
        	};
        	
        	$scope.prePage = function (){
        		$scope.page = $scope.page.prePage;
        		$scope.selectKArtListByDate();
        	};
        	
        	$scope.nextPage = function (){
        		$scope.page = $scope.page.nextPage;
        		$scope.selectKArtListByDate();
        	};
        	
            $scope.lastPage = function (){
        		$scope.page = $scope.page.totalPage;
        		$scope.selectKArtListByDate();
        	};
             $scope.pageJump=function(obj)  {
                   window.location.href="${ctx}/visitor/sub7?A_id="+obj;
        };
        }]);
        
     
    </script>
</head>

<body ng-controller="sub2">
    <!-- 头部 -->
    <header>
        <!-- 顶部 -->
        <div id="top" class="clear">
            <p>
                <a href="#">마이페이지</a>
                <a href="#">도와드릴까요?</a>
                <a href="#">학부모마당</a>
                <a href="#">管理员登陆入口</a>
            </p>
        </div>
        <!-- 顶部 -->
        <!-- 导航 -->
        <nav class="clear">
	         <ul class="nav">
	            <li class="item">
	                <a href="${ctx}/main.html">首页</a>
	            </li>
	            <li class="item">
	                <a href="javascript:;">介绍</a>
	                <div class="submenue">
	                    <ul class="clear">
	                        <li><a href="#">学校介绍</a></li>
	                        <li><a href="${ctx}/visitor/sub4">师资介绍</a></li>
	                        <li><a href="${ctx}/visitor/sub1">课程介绍</a></li>
	                    </ul>
	                </div>
	            </li>
	            <li class="item">
	                <a href="${ctx}/visitor/sub2">优秀作品展示</a>
	            </li>
	            <li class="item">
	                <a href="${ctx}/visitor/sub3">招生简章</a>
	            </li>
	            
	     		<li class="item"  style="display:none" id="hidLi">
	                <a href="${ctx}/student/sub6">个人信息</a>
	            </li>
	            <li class="item"  style="display:none" id="hidLi2">
	                <a href="${ctx}/student/sub9">我的订单</a>
	            </li>
	        </ul>
	    </nav>
        <input type="hidden" value="${load}"  id="hiddenLoad">
        <input type="hidden" value="${username}"  id="username">
	    <!-- 导航 -->
	    <!-- 登录 -->
	    <section id="login">
	        <div class="content clear">
	            <h3>登&nbsp录</h3>
	            <div class="usr">
	                <label>用户名</label>
	                <input type="text" value="" />
	            </div>
	            <div class="pwd">
	                <label>密码</label>
	                <input type="password" value="" />
	            </div>
	        </div>
	        <div class="bottom">
	            <a href="#">登录</a>
	            <a href="#">注册</a>
	        </div>
	    </section>
	    <!-- 登录 -->
    </header>
    <!-- 头部 -->

    <!-- 主体 -->
    <div>
    	<article id="sub2" class="clear">
	    <!-- 侧边栏 -->
	    <aside>
	        <div class="icon">
	            <div class="hoop">
	                <p class="hoop_t">교과학습</p>
	                <div class="nav">
	                    <ul>
	                        <li><a href="#" class="active">나의학습</a><span class="line"></span></li>
	                        <li><a href="#">학습결과</a><span class="line"></span></li>
	                        <li><a href="#">학습다지기</a><span class="line"></span></li>
	                        <li><a href="#">월말평가</a></li>
	                    </ul>
	                </div>
	            </div>
	
	            <div class="hoop1">
	                <span class="line2"></span>
	                <div class="notice">
	                    <p class="notice_t">전국모의고사 안내</p>
	                    <div class="clear pos">
	                        <p class="notice_c">
	                            전국의 친구들과
	                            실력을 겨뤄보는
	                        </p>
	                        <p class="circle"><a href="#">GO</a></p>
	                    </div>
	                    <p class="notice_t">3Q 안내</p>
	                    <div class="clear pos">
	                        <p class="notice_c">
	                            나의인성,지성,감성을 알수 있는
	                        </p>
	                        <p class="circle"><a href="#">GO</a></p>
	                    </div>
	                </div>
	            </div>
	        </div>
	    </aside>
	    <!-- 侧边栏 -->
	    <!-- 主体 -->
	    <section class="main">
	        <div class="main_top"></div>
	
	        <div class="title_log">
	            <p class="title">优秀作品展示</p>
	        </div>
	        <div class="search_pos">
	            <div class="search">
	                <input ng-model="keyword" type="text" placeholder="按学生或班级搜搜"/>
	                <a href="javascript:void(0);" ng-click="selectKArtListByDate()"></a>
	            </div>
	
	            <ul class="iptgroup">
	                <li style="font-size:11px;font-weight:bold;color:#52840c;">起始日期：</li>
	                <li><input type="text" readonly="readonly" class="doubledate ipticon" id="startDate"/></li>
	                <li style="font-size:11px;font-weight:bold;color:#52840c;">终止日期：</li>
	                <li><input type="text" readonly="readonly" class="doubledate ipticon" id="endDate"/></li>
	                <div class="bottom" style="float: left;margin-top: -6px;padding-left: 5px;">
	                	<a href="javascript:void(0);" ng-click="selectKArtListByDate()">搜索</a>
	                </div>
	            </ul>
	        </div>
	            
	        <div class="main_content">
	            <div class="class_all clear">
	                <div class="class_part" ng-repeat="kArt in kArtList">
	                    <div class="class">
	                        <p class="class_t" ng-bind="kArt.acontent"></p>
	                        <p class="class_c" ng-bind="kArt.stuname"><!-- 컨텐츠 부가설 명을위한공간입. --></p>
	                        <p class="class_c2" ng-bind="kArt.stuclass"></p>
	                        <!-- <p class="class_p1"></p> -->
	                    </div>
	                    <div class="bottom"><a href="javascript:;"  ng-click="pageJump(kArt.aid)">详细信息</a></div>
	                </div>
	            </div>
	            
	            <div>
	            	<div class="page">
	            		<a href="javascript:void(0);" ng-click="firstPage()">首页</a>
	                	<a href="javascript:void(0);" ng-click="prePage()">上页</a>
	                	<a href="javascript:void(0);" ng-click="nextPage()">下页</a>
	                	<a href="javascript:void(0);" ng-click="lastPage()">尾页</a>
	                </div>
	            </div>
	        </div>
	    </section>
	    <!-- 主体 -->
	</article>
    </div>
    <!-- 主体 -->

    <!-- 尾部 -->
    <footer>
        <div class="f_content clear">
            <p class="blogroll">
                <a href="#">회사소개</a>
                <a href="#">개인정보취급방침</a>
                <a href="#">이용안내</a>
            </p>
            <div class="search">
                <input type="text" value="family site" />
                <a href="#"></a>
            </div>
            <div class="copyRight">
                <p>서울시 강동구 성내동 5x8-8번지 20x호 I  TEL: 02-47x-45x2  FAX: 02-x78-4x83</p>
                <span>copyright(c) 2010 company co.,ltd. all rights reserved</span>
            </div>
        </div>
    </footer>
    <!-- 尾部 -->
</body>
<script type="text/javascript">
 var type=$("#hiddenLoad").val();
function navChangeinite()
{
	  if(type=="yes")		
		     {
		      document.getElementById("hidLi").style.display='block';
		         document.getElementById("hidLi2").style.display='block';
		      }
}
navChangeinite();
</script>
</html>